package chai.ning.constructor;

public class Animal {
	
	private String name ;
	
	public Animal(){
		super(); // 调用父类中的无参数构造方法
		System.out.println( "constructor : Animal()" );
	}
	
	public Animal( String name ) {
		super(); // 调用父类中的无参数构造方法
		System.out.println( "constructor : Animal( String )" );
		this.name = name ;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
